package testserviceacontroller.controller;

import com.hzh.service.AService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/a")
public class AController {
    @DubboReference
    private AService aService;

    @RequestMapping("/hello")
    public String hello() {
        return "Hello from AController";
    }

    @RequestMapping("/callA")
    public String callAService() {
        return aService.getA();
    }

    @RequestMapping("/callB")
    public String callBService() {
        return aService.getB();
    }

    @RequestMapping("/ex")
    public String callBEx() {
        return aService.getEx();
    }
}
